#ifndef KEY_H
#define KEY_H
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"

#define KEY_PIN 0
#define LONG_PRESS_DURATION 3000

#define SHORT_PRESS_EVENT_BIT (1 << 0)
#define LONG_PRESS_EVENT_BIT (1 << 1)

typedef enum
{
    KEY_RELEASED,
    KEY_PRESSED
} KeyState;

extern EventGroupHandle_t key_event_group;

void key_init();
KeyState key_get_state();

#endif